﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using GameEngine.Managers.ConcreteManagers;
using GameEngine.Managers.IManagers;
using Microsoft.Xna.Framework.Audio;
using System.Diagnostics;
using GameEngine.Entities;

namespace GameEngine.EntityComponents
{
    public class SoundableComponent : IEntityComponent
    {
        private AbstractEntity entity;
        private AudioManager audioManager;
        private InputManager inputManager;
        private Dictionary<String, SoundEffect> sounds;
        private float volume = 1.0f;
        private DateTime lastInput = DateTime.Now;

        /// <summary>
        /// Initializes a new instance of the <see cref="SoundableComponent" /> class.
        /// </summary>
        /// <param name="entity">The entity.</param>
        public SoundableComponent(AbstractEntity entity)
        {
            this.entity = entity;
            audioManager = (AudioManager)entity.game.Services.GetService(typeof(IAudioManager));
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="SoundableComponent" /> class.
        /// </summary>
        /// <param name="entity">The entity.</param>
        /// <param name="sounds">The sounds.</param>
        public SoundableComponent(AbstractEntity entity, Dictionary<String, SoundEffect> sounds)
        {
            this.entity = entity;
            this.sounds = sounds;
        }


        public void Update(GameTime gameTime)
        {
        }

        public void CollideWith(AbstractEntity target, bool isX, bool isY)
        {
        }
    }
}
